<template>
  <li>
    <a href="#" :data-item="popInfo.dataItem" :menu-name="popInfo.menuName">
      <div class="content">
        <div class="icon">
          <slot />
        </div>
        <div class="title">{{ popInfo.title }}</div>
      </div>
    </a>
  </li>
</template>

<script>
export default {
  props: {
    popInfo: {
      type: Object,
      default: () => ({ title: "等待...", dataItem: "2", menuName: "#" }),
    },
  },
};
</script>

<style lang="less" scoped>
.content {
  height: 100%;
  .icon {
    position: relative;
    font-size: 30px;
    top: 50%;
    transform: translateY(-50%);
  }
  .title {
    position: relative;
    top: 40%;
  }
}
li {
  animation: idle 4s ease-in-out infinite;
  text-align: center;
  width: 5em;
  height: 5em;
  transform: translate(-50%, -50%);
}

a {
  border-radius: 50%;
  width: 100%;
  height: 100%;
}
li a {
  box-shadow: 0 0 0 0.1em #0cf inset, 0 0 1em #0cf inset;
  color: currentColor;
  display: inline-block;
  text-decoration: none;
  transition: transform 0.4s linear, box-shadow 0.15s linear, margin 0.1s linear,
    width 0.1s linear, height 0.1s linear;
}

li a span {
  transition: color 0.15s linear;
}
li a:before {
  background-color: #fff;
  border-radius: 50%;
  content: "";
  display: block;
  opacity: 0.5;
  position: absolute;
  top: 0.75em;
  left: 0.75em;
  width: 1em;
  height: 0.5em;
  transform: rotate(-45deg);

  li a:focus,
  li a.current {
    box-shadow: 0 0 0 0.1em #ff0 inset, 0 0 1em #ff0 inset;
    outline: 0;
  }
  li a:focus span,
  li a.current span {
    color: #ff0;
  }
  li a:hover {
    margin: -5% 0 0 -5%;
    width: 110%;
    height: 110%;
  }
  li a:hover svg {
    width: 3em;
    height: 3em;
  }
}
</style>